var Redis=require('ioredis');
var redis=new Redis();

var pipe=redis.pipeline();

pipe.set('foo','bar');
pipe.get('foo');

pipe.set('cc','CC');
pipe.get('cc');

pipe.del('del','cc');
pipe.exec((err,rets)=>{
    console.log(err,rets);
});


redis.pipeline().set('foo','FOO').get('foo').set('bar','BAR').get('bar').del('foo').exec((err,rets)=>{
    console.log(err,rets);
});

redis.pipeline([
    ['set','foo','FOO'],
    ['get','foo'],
    ['set','bar','BAR'],
    ['del','bar']
]).exec((err,rets)=>{
    console.log(err,rets);
});